﻿<UserControl 
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  
    x:Class="SMIL.InfoTool.InfoTool"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:ex="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
             
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="330" Height="Auto">

    <UserControl.Resources>

        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/DeepEarth.BingMapsToolkit.Client.Common;component/Resources/CommonStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
        <DataTemplate x:Key="itemdetail">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding fieldName}" FontWeight="Bold" Width="100" Margin="0,0,5,0" />
                <TextBlock Text="{Binding fieldValue}" />
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="linkedItemdetail">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding fieldName}" FontWeight="Bold" Width="270" Margin="4,4,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" />
                <Button Style="{StaticResource ButtonStyle}" Margin="2" Width="24" Height="24"
                        HorizontalAlignment="Right" VerticalAlignment="Top" x:Name="bLinkedItemDetail" Tag="{Binding fieldType}" Click="bLinkedItemDetail_Click">
                    <Image Source="Images/folder.png" Height="22" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Center"
                           Stretch="Uniform" ToolTipService.ToolTip="Länk till objekt i SharePoint" />
                </Button>
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>

    <Border CornerRadius="8" >
        <Border.Background>
            <SolidColorBrush Color="#616161" Opacity="0.90" />
        </Border.Background>

        <Grid x:Name="LayoutRoot">
            <Button x:Name="PART_Openbutton" Margin="2,2,2,2" Click="PART_Openbutton_Click" Width="24" Height="24" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource ButtonStyle}">
                <Image Source="Images/folder.png" Height="22" Width="Auto" Stretch="Uniform" />
            </Button>
            <!--<Button x:Name="PART_CloseButton"  Content="x" Margin="2,2,2,2" Click="PART_CloseButton_Click" Width="24" Height="24" HorizontalAlignment="Right" VerticalAlignment="Top" Style="{StaticResource ButtonStyle}">
            </Button>-->
            <StackPanel Height="Auto" VerticalAlignment="Top">
                <TextBlock x:Name="PART_Subtitle" Text="Reports->General"  FontSize="12" FontWeight="Bold" Foreground="#FFCDCDCD" HorizontalAlignment="Center" />
                <TextBlock x:Name="PART_Title" Text="Title" FontSize="13.3" FontWeight="Bold" HorizontalAlignment="Center" Foreground="White" />

                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
                    <!--<Button x:Name="PART_Selectbutton" Content="Select" FontSize="12" Width="100" Margin="4" Visibility="Collapsed" Click="PART_Selectbutton_Click" Style="{StaticResource ButtonStyle}" />
                    <ComboBox x:Name="PART_Views" Height="30" Margin="14,10,14,0" FontSize="12" SelectionChanged="PART_Views_SelectionChanged" Visibility="Collapsed"/>-->
                </StackPanel>
                <ex:TabControl Name="theTabControl"  Height="250"></ex:TabControl>
            </StackPanel>
        </Grid>
    </Border>
</UserControl>
